﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LP580.CG;

public partial class User_UC1 : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        clsUserAccount ua = clsUserAccount.getCookieUser(true);

        /****检查用户会员类型***/
        //CheckMemberType(ua);
    }

    protected string NavCssClass(string fname, string CurrentCSS, string OtherCSS)
    {
        string css = OtherCSS;

        string name = Request.PhysicalPath;
        int c = name.LastIndexOf("\\");
        if (c > 0)
        {
            name = name.Substring(c + 1);
        }
        if (fname.ToLower() == name.ToLower())
        {
            css = CurrentCSS;
        }
        return css;
    }

    /// <summary>
    /// 检查用户会员类型
    /// 如果非经销商用户（即MemberType!=2），则停止响应。
    /// </summary>
    /// <param name="ua"></param>
    private void CheckMemberType(clsUserAccount ua)
    {
        if (ua.MemberType != 1)
            Response.End();
    }

}
